home *** CD-ROM | disk | FTP | other *** search
/ Risc World 3 / Risc World 3.iso / SOFTWARE / ISSUE3 / PD / NEWALARM / !NewAlarm / !Help < prev    next >
Text File  |  2001-10-05  |  19KB  |  178 lines

  1.     **  NewAlarm  **
  2.             a 'rough time' alarm program by Miss H.Bazley
  3.                 version 1·33
  4.                 
  5. --------------------------------------------------------------------------------
  6. PURPOSE OF PROGRAM
  7.  
  8. To tell the time and handle alarms in a vague text-based manner rather than with digital precision.   This program supports interactive !Help.
  9. --------------------------------------------------------------------------------
  10. HARDWARE/SOFTWARE REQUIREMENTS
  11.  
  12. RISC-OS 3·1 minimum (RISC-OS 4 and StrongARM compatible) and 36-64k free memory.   NewAlarm *should* work for French or German versions of RISC-OS, but the syntax will sound really stupid so it is probably a waste of effort.
  13.  
  14. This program may be run from within a read-only archive.
  15. --------------------------------------------------------------------------------
  16. HOW TO USE THE PROGRAM
  17.  
  18. Run the program.   The main window will open and so will the alarm list, showing all the current alarms in memory in descending order.
  19.  
  20. Drag SELECT to move the main window, or drag ADJUST to move it without bringing it to the front.   Double-click SELECT to set a new alarm (like 'Set new alarm...' on menu).   Click ADJUST to reopen the alarm list (like 'List alarms...' on menu).
  21.  
  22. When an alarm goes off, an alert window will appear in the middle of the screen displaying the alarm's text and, if it is a repeating alarm, the time at which it will next go off.   Click on the OK icon (or press RETURN) to make it go away.
  23.  
  24. --------------------------------------------------------------------------------
  25. THE MAIN MENU
  26.  
  27. 'Info' leads to a standard info window telling you the name and version of the program.
  28. 'Set new alarm...' opens the 'Set alarm' window (see below under 'NEW ALARMS')
  29. 'Save alarms' updates the alarm file inside NewAlarm (or deletes it if there are no alarms remaining) and saves the current position of both windows.
  30. The  -autosave option (see below) will do this automatically every time an alarm goes off.
  31. 'List alarms...' opens the alarm list.
  32. 'Most recent alarm' leads to a submenu allowing you to redisplay the the alarm which has just gone off, or to recreate another alarm with similar text.   If you are busy typing and automatically hit RETURN when the alarm goes off, you can use this option to get back what you missed!
  33. 'Quit' quits the program.   If you have unsaved alarm data a warning window will open.   Select 'Save' (or press RETURN) to save alarms and quit, 'Discard' to quit without saving, or 'Cancel' (or ESCAPE) if you decide you would rather not quit after all.
  34. --------------------------------------------------------------------------------
  35. NEW ALARMS
  36.  
  37. Use the up and down arrow icons in the 'Set alarm' window to set the time at which the alarm is to go off.   Type your message into the three writable icons.   Note that pressing RETURN will have the same effect as clicking on the 'OK' icon - use the TAB or cursor arrow keys to move between icons.
  38.  
  39. Selecting the 'Repeats' option icon  or pressing CTRL-R will open the 'Repeat alarm' window which controls how often your alarm will repeat - every month, every two weeks, every six hours.   You can also control on which days of the week the alarm will go off - for example, you can create a 'working week' alarm which repeats every day but does not go off on Saturdays or Sundays.   Note that careless use of this feature can create alarms that will never go off!
  40.  
  41. If the 'Repeats' icon is not selected then the alarm will not repeat.
  42.  
  43. The 'OK' button will set the alarm.   Alarms must be set to go off in the future.   You will be warned if the alarm would go off immediately it had been set.
  44.  
  45. Pressing the 'Cancel' button or ESCAPE key will close the window without setting any alarm.
  46. --------------------------------------------------------------------------------
  47. THE ALARM LIST WINDOW
  48.  
  49. This scrolling window lists all the alarms currently waiting to go off, in date order.   Alarms printed in red are those due to go off before 4am tomorrow.   Alarms marked with a narrow triangle at the left of the window are those set to repeat.   If there is an asterisk at the end of the window title then the alarm database has been modified since NewAlarm was loaded and not yet saved.   You will be given the option to save it before the program quits.
  50.  
  51. Double-clicking on any of the alarms in this window will open the 'Alter alarm' window.   This works like the 'Set alarm' window (see 'NEW ALARMS' above), only it alters the settings of the selected alarm instead of creating a new alarm.   Click on 'Cancel' to leave the alarm unchanged.   Pressing 'Reset' will not delete the alarm - you need to delete alarms from the menu (see below)
  52.  
  53. Clicking MENU over any of the alarms in this window will open a small menu with four options which allow you to delete, alter (as above), copy or defer the selected alarm.   If you elect to copy the alarm, a duplicate alarm will be created and the 'Alter alarm' window will be opened to allow you to adjust the settings, since it is assumed that you wish to base one alarm upon another rather than creating two absolutely identical alarms!
  54.  
  55. To defer an alarm is to advance it by a week, a month, three hours or however long the defined repeat interval might be; in effect, to skip the occasion when it was next due to go off.  Only repeating alarms can be deferred.
  56.  
  57. --------------------------------------------------------------------------------
  58. FEATURES
  59.  
  60. Alarms are held in a file called Alarms in the directory Choices:NewAlarm within the !Boot structure, if present, and the stored window positions are held in a file Position.   Otherwise both files will be stored within the !NewAlarm application directory itself.   Either of these files may be deleted without ill-effects (apart from losing any data held in it!)
  61.  
  62. The time in the 'Set alarm' window is not reset to the current time whenever you set a new alarm - nor are the repeats.   This is deliberate.   I find it more convenient when setting a number of alarms.   The 'Reset' button will update the displayed time if required.
  63.  
  64. The default setting in the 'Repeats' window can be altered by editing the parameters passed to the !RunImage by the !NewAlarm.!Run file.   I find values of "-interval 4   -value 1" handy - this causes the window to open with an initial setting of 1 week.   If you pass invalid parameters or omit them NewAlarm will revert to a setting of 5 minutes.
  65.  
  66. You may also pass an "-autosave" parameter in the !Run file.   "Run <NewAlarm$Dir>.!RunImage -autosave" will cause the Alarms file automatically to be updated every time an alarm goes off.  Note that this will also store the position of both windows at that moment....
  67.  
  68. If the top line of the alarm text begins with an asterisk then the text of the three icons will be combined and run as a 'task alarm'.   If you want to do anything complicated it is easier to create an Obey file with the necessary commands in it, and then create a task alarm which runs this Obey file.
  69.  
  70. The alarm list window extends horizontally to fit the longest alarm entered, but doesn't shrink back when they go off (or when you delete them).
  71.  
  72. To avoid confusion with the existing newly-updated entry in the alarm list, any repeating alarms recalled using 'Show'/'Edit' 'Most recent alarm' are displayed as simple one-off alarms without repeat information.   'Show' will display the time the alarm was originally due;  'Edit' will update the 'Set alarm' window with the current time but the original text.
  73.  
  74. If NewAlarm displays an hourglass and appears to hang when you run it, it is probably calculating multiple repeats.   For example, if you set up an alarm to repeat every five minutes and then don't load NewAlarm for two or three months, it may take several minutes to calculate when the next repeat to go off should be.   Pressing ESCAPE will bring up an error box telling you how far it has got and giving you the option to abort the process.   If you select the CANCEL button the repeating alarm will be deleted altogether - if you click on OK NewAlarm will continue to calculate repeats.
  75.  
  76. The computer *will* continue to multitask while an alarm is going off.
  77.  
  78.  
  79. Yes, my alarm clock really does look like that.
  80.  
  81. --------------------------------------------------------------------------------
  82. CREDITS
  83.  
  84. I am indebted to the authors of Acorn's !Alarm, Doggysoft's !RoughTime, and !Tyme for various features which I have put into this program — indeed, it was intended to be an amalgam of what I liked best about all of them.   In true Microsoft fashion, while I have imitated the 'look and feel' I haven't actually copied any of the code!
  85.  
  86. I am also indebted to Andrew Ayre for his DrWimp library.   Although NewAlarm now uses its own Wimp procedures, DrWimp made my life much easier during the intial development of the program.
  87.  
  88. The SlidingHeap module and BASIC library are © Steven Haslam and may be distributed under the terms of the GNU Public Licence (copy included).   This module allows a program to set up a sliding heap of memory blocks within its own Wimpslot, avoiding the fragmentation of the RMA caused by the OS_Heap routines.   It works under RISC-OS 2 or greater.
  89. --------------------------------------------------------------------------------
  90. LICENCE
  91.  
  92. This program is freeware, distributed under the terms of the GNU Public Licence.   Full source code is provided.   You may give copies to your friends, alter the program, or borrow bits of it for your own programs, just as you please without charge, provided you make it clear what you have done.
  93. --------------------------------------------------------------------------------
  94. CONTACTING THE AUTHOR
  95.  
  96. The author may be contacted at:
  97.   43, Wilton Grove
  98.   Wimbledon
  99.   London SW19 3QU
  100.  
  101. or via e-mail at    harriet@bazley.freeuk.com
  102.             chrisbazley@bigfoot.com
  103.   
  104. --------------------------------------------------------------------------------
  105. HISTORY
  106. v1·00    April-June 1999
  107.     Unreleased version.
  108. v1·01    Rewrote whole program to avoid use of DrWimp library (which was invaluable during development) and hence reduce Wimpslot.
  109.     Provided option to configure repeat time/interval (see !Run file).   It's intended to be program-friendly, not user-friendly.   If you don't pass any parameters it will revert to the old default (repeat every 5 minutes).
  110.     You are no longer offered the option to repeat every 0 minutes!
  111.     Fixed minor bug where window title was updated on change but not actually redrawn.
  112.     Fixed AM/PM bug where 'twenty-five to midnight' counted as 'AM' (because the hour was counted as 'midnight' and not 'eleven')
  113.     Fixed very stupid bug caused by typing ptr%?7 twice, instead of ptr%?7 followd by ptr%?8
  114. v1·10    (1st April 2000)
  115.     Alarms due to go off on the current day are now listed in red at the top of the alarm list window (to let the user know what his commitments for the day are!)
  116.     Corrected lazy redrawing of alert window — should no longer be corrupted if other windows pop up on top of it.
  117.     Program now beeps continuously while alert window is open (in case you were out of the room when alarm went off)
  118. v1·11    (17th April 2000)
  119.     Changed syntax of call to OS_GetEnv since this proved to be causing problems on a machine with 64Mb RAM.
  120. v1·12    (1st June 2000)
  121.     Corrected silly bug where alarm list was sometimes redrawn incorrectly if two or more alarms had been deleted since first running the program.
  122.     Added key shortcuts — CTRL-R to toggle the repeat window and ESCAPE to abandon creation/editing of an alarm.
  123.     Task alarms now concatenate the text from all three icons in the 'Set alarm' window instead of only reading the text from the top icon (thus implementing a 120-character command line rather than the previous almost unusable 40-character command line), allowing you to split long pathnames across several lines of text.
  124. v1·13    (3rd June 2000)
  125.     Rationalised handling of repeat window.   'Reset' button now also clears settings of repeat window (to user-defined default).   Clicking on 'Cancel' button or close icon of 'Set alarm' window' or pressing ESCAPE now clears setting of 'Repeat' icon.
  126. v1·14    (9th June 2000)
  127.     The 'next repeat' date displayed when a repeating alarm goes off now takes into account the valid weekdays set for that alarm;  i.e. a daily alarm defined as 'Mondays to Fridays only' will not claim on Fridays that the next repeat will be on Saturday, when in practice the alarm would be suppressed on that day.   Note that this is a purely cosmetic bug - alarms have always gone off correctly, despite the fact that they occasionally claimed otherwise!
  128. v1·15    (15th June 2000)
  129.     [This is getting silly!  6th minor update in last 1½ months....]
  130.     Passing of parameters in !Run file is now handled using OS_ReadArgs instead of my own custom procedure, allowing parameters to be assigned names (-repeat and -interval) and specified in any order.   More robust and slightly more user-friendly.
  131. v1·16    (24th June 2000)
  132.     "days", for red-text purposes, now run from 4am to 4am rather than from midnight to midnight.  Alarms set for the small hours are essentially a continuation of the previous day and it is more helpful to show them as such.
  133. v1·20    (26th June 2000)
  134.     Major desktop font upgrades:    text of all three icons now appears in alarm list window (a slight disagreement over what constitutes a string terminator between BASIC and Wimp_TextOp there)!   Maximum width of alarm list window now takes into account width of alarm text in desktop font.   'Date', 'Time' and 'Message' icons now filled in order to force the WIMP to anti-alias them with the correct background colour.   Altered width of icons and repeats window to allow for desktop font.
  135.     I really should have noticed all these before....   You can tell I use the system font myself, can't you?   :-)
  136.  
  137.     Editing a repeating alarm used to cause the repeat setting to be removed.   This bug, introduced (I think) in v1·13, now fixed.
  138.     Repeating alarms marked in alarm list by a triangle on the left of text.
  139.     Red text in alarm list window for all alarms prior to 'tomorrow', not just for current day — i.e. includes 'expired alarms' from previous days if you haven't run the program for a while.   Speeds up redraw slowed down by all the upgrades above....
  140. v1·21    (16th August 2000)
  141.     Very minor upgrade — time display now updates on mode change (i.e. you no longer have to wait up to a minute after  quitting a single-tasking application/game before NewAlarm 'catches up'.   After resetting the internal clock, just press F12 then RETURN to force an update.
  142. v1·22    (3rd September 2000)
  143.     Fixed two things that irritated me:
  144.     • Finally got round to implementing proper 'Save'/'Cancel'/'Discard' options for unsaved data on shutdown.   During the course of this I ended up rewriting the handling of the main poll loop and implementing proper Message_PreQuit and desktop shutdown handling at last.
  145.     • The alert and shutdown warning windows now give the input focus back when they have finished with it!
  146.     Also removed close icon from edit alarms window in accordance with Style Guide (& in order to prevent perversely-minded persons from iconising it).
  147. v1·23    (4th November 2000)
  148.     Noticed that during desktop closedown the pointer was still confined to the shutdown window area even after NewAlarm had quit - causing problems with any error boxes subsequently displayed by other programs.
  149.     The third line of the alarm text for repeating alarms was being displayed too close to the OK button in the alert window.   Moved all alarm text 26 OS units up window (you really wanted to know that, didn't you?)
  150. v1·24    (1st December 2000)
  151.     BUG FIX: error handling no longer closes ALL open files (oops!)
  152.     Changed handling of alarms list - no longer resized to maximum every time you edit/create an alarm, and no longer opened initially as a 'temporary window' (menu).
  153.     Position and size of alarms list is now saved along with its contents - every time you run the program it should reopen where you last saved it.
  154.     These changes finally make scrolling/resizing this window worthwhile!
  155. v1·30    (15th December 2000)
  156.     Major bug-fix which unfortunately later proved not to have been entirely effective....
  157.     Minor change:  position of main window now saved along with position of alarm list.
  158. v1·31    (11 May 2001)
  159.     Fixed bug causing address exception when MENU clicked at very top of alarms list
  160.     Alarms list no longer accessible as a submenu item - this proved incompatible with the new handling of this window introduced in version 1·24 (and I never used it anyway).
  161.     Vile bug finally fixed by RMEnsuring BorderUtils - turned out to be known RISC OS 3·1 problem, not my fault at all!
  162.     Added 'Show most recent alarm' and 'Edit most recent alarm' options
  163.     Altered 'Copy alarm';  copied alarm no longer created until 'OK' actually pressed in edit window
  164.     Added 'Defer until next repeat' option
  165.     NewAlarm now stores its alarm/position files in Choices:NewAlarm if available
  166.     Suppressed MessageTrans errors
  167.     Tweaked alarm sorting - repeating alarms are always sorted below any one-off alarms due at the same time
  168. v1·32    (1st July 2001)
  169.     Fixed minor bug causing flickering; screen area is now only marked for update if alarm list is actually open.
  170.     Removed inadvertant recursion which used to cause the program to run out of memory if multiple alarms went off in succession.
  171.     Cleaned up null-poll handling and deleted large sections of program - oh, I just love it when that happens!   The program now updates its window every 6 seconds instead of every 60 seconds, making it much more responsive while retaining what is in effect a zero processor load (particularly in comparison to, say, !Alarm...)
  172.     Added 'autosave' option (set by default)
  173.     Fixed 'Too far in the future' bug caused by Sliding_Heap sliding unexpectedly.
  174. v1·33    (5th October 2001)
  175.     Fixed 'feature' which allowed the mouse pointer to get lost off the edge of the screen after releasing it from constraint within error box.   I was under the impression that resetting to an infinite bounding box was the RISC OS norm.   It isn't!
  176.     Instant update on mode change reinstated (from v1·21).   I had assumed the new six-second update would be fast enough not to be annoying when returning to desktop after single-tasking.   It isn't!
  177.     No longer causes errors when <Choices$Write> is not writable, i.e. when FSLock is in use.
  178.     Title bar update now only redraws actual titlebar area and *really* only takes place when the window is open!   (Bugfix from v1·32 above - I was checking for bits set in the window handle by mistake, instead of in the window flags...)